\(\int \sqrt {a \cot ^4(x)} \, dx\) [34]

   Optimal result
   Rubi [A] (verified)
   Mathematica [C] (verified)
   Maple [A] (verified)
   Fricas [B] (verification not implemented)
   Sympy [F]
   Maxima [A] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [F(-1)]

Optimal result

Integrand size = 10, antiderivative size = 32 \[ \int \sqrt {a \cot ^4(x)} \, dx=-\sqrt {a \cot ^4(x)} \tan (x)-x \sqrt {a \cot ^4(x)} \tan ^2(x) \]

[Out]

-(a*cot(x)^4)^(1/2)*tan(x)-x*(a*cot(x)^4)^(1/2)*tan(x)^2

Rubi [A] (verified)

Time = 0.02 (sec) , antiderivative size = 32, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.300, Rules used = {3739, 3554, 8} \[ \int \sqrt {a \cot ^4(x)} \, dx=-x \tan ^2(x) \sqrt {a \cot ^4(x)}-\tan (x) \sqrt {a \cot ^4(x)} \]

[In]

Int[Sqrt[a*Cot[x]^4],x]

[Out]

-(Sqrt[a*Cot[x]^4]*Tan[x]) - x*Sqrt[a*Cot[x]^4]*Tan[x]^2

Rule 8

Int[a_, x_Symbol] :> Simp[a*x, x] /; FreeQ[a, x]

Rule 3554

Int[((b_.)*tan[(c_.) + (d_.)*(x_)])^(n_), x_Symbol] :> Simp[b*((b*Tan[c + d*x])^(n - 1)/(d*(n - 1))), x] - Dis
t[b^2, Int[(b*Tan[c + d*x])^(n - 2), x], x] /; FreeQ[{b, c, d}, x] && GtQ[n, 1]

Rule 3739

Int[(u_.)*((b_.)*tan[(e_.) + (f_.)*(x_)]^(n_))^(p_), x_Symbol] :> With[{ff = FreeFactors[Tan[e + f*x], x]}, Di
st[(b*ff^n)^IntPart[p]*((b*Tan[e + f*x]^n)^FracPart[p]/(Tan[e + f*x]/ff)^(n*FracPart[p])), Int[ActivateTrig[u]
*(Tan[e + f*x]/ff)^(n*p), x], x]] /; FreeQ[{b, e, f, n, p}, x] &&  !IntegerQ[p] && IntegerQ[n] && (EqQ[u, 1] |
| MatchQ[u, ((d_.)*(trig_)[e + f*x])^(m_.) /; FreeQ[{d, m}, x] && MemberQ[{sin, cos, tan, cot, sec, csc}, trig
]])

Rubi steps \begin{align*} \text {integral}& = \left (\sqrt {a \cot ^4(x)} \tan ^2(x)\right ) \int \cot ^2(x) \, dx \\ & = -\sqrt {a \cot ^4(x)} \tan (x)-\left (\sqrt {a \cot ^4(x)} \tan ^2(x)\right ) \int 1 \, dx \\ & = -\sqrt {a \cot ^4(x)} \tan (x)-x \sqrt {a \cot ^4(x)} \tan ^2(x) \\ \end{align*}

Mathematica [C] (verified)

Result contains higher order function than in optimal. Order 5 vs. order 3 in optimal.

Time = 0.02 (sec) , antiderivative size = 28, normalized size of antiderivative = 0.88 \[ \int \sqrt {a \cot ^4(x)} \, dx=-\sqrt {a \cot ^4(x)} \operatorname {Hypergeometric2F1}\left (-\frac {1}{2},1,\frac {1}{2},-\tan ^2(x)\right ) \tan (x) \]

[In]

Integrate[Sqrt[a*Cot[x]^4],x]

[Out]

-(Sqrt[a*Cot[x]^4]*Hypergeometric2F1[-1/2, 1, 1/2, -Tan[x]^2]*Tan[x])

Maple [A] (verified)

Time = 0.03 (sec) , antiderivative size = 27, normalized size of antiderivative = 0.84

method result size
derivativedivides \(\frac {\sqrt {a \cot \left (x \right )^{4}}\, \left (-\cot \left (x \right )+\frac {\pi }{2}-\operatorname {arccot}\left (\cot \left (x \right )\right )\right )}{\cot \left (x \right )^{2}}\) \(27\)
default \(\frac {\sqrt {a \cot \left (x \right )^{4}}\, \left (-\cot \left (x \right )+\frac {\pi }{2}-\operatorname {arccot}\left (\cot \left (x \right )\right )\right )}{\cot \left (x \right )^{2}}\) \(27\)
risch \(\frac {\sqrt {\frac {a \left ({\mathrm e}^{2 i x}+1\right )^{4}}{\left ({\mathrm e}^{2 i x}-1\right )^{4}}}\, \left ({\mathrm e}^{2 i x}-1\right )^{2} x}{\left ({\mathrm e}^{2 i x}+1\right )^{2}}+\frac {2 i \sqrt {\frac {a \left ({\mathrm e}^{2 i x}+1\right )^{4}}{\left ({\mathrm e}^{2 i x}-1\right )^{4}}}\, \left ({\mathrm e}^{2 i x}-1\right )}{\left ({\mathrm e}^{2 i x}+1\right )^{2}}\) \(85\)

[In]

int((a*cot(x)^4)^(1/2),x,method=_RETURNVERBOSE)

[Out]

(a*cot(x)^4)^(1/2)/cot(x)^2*(-cot(x)+1/2*Pi-arccot(cot(x)))

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 61 vs. \(2 (28) = 56\).

Time = 0.28 (sec) , antiderivative size = 61, normalized size of antiderivative = 1.91 \[ \int \sqrt {a \cot ^4(x)} \, dx=\frac {{\left (x \cos \left (2 \, x\right ) - x - \sin \left (2 \, x\right )\right )} \sqrt {\frac {a \cos \left (2 \, x\right )^{2} + 2 \, a \cos \left (2 \, x\right ) + a}{\cos \left (2 \, x\right )^{2} - 2 \, \cos \left (2 \, x\right ) + 1}}}{\cos \left (2 \, x\right ) + 1} \]

[In]

integrate((a*cot(x)^4)^(1/2),x, algorithm="fricas")

[Out]

(x*cos(2*x) - x - sin(2*x))*sqrt((a*cos(2*x)^2 + 2*a*cos(2*x) + a)/(cos(2*x)^2 - 2*cos(2*x) + 1))/(cos(2*x) +
1)

Sympy [F]

\[ \int \sqrt {a \cot ^4(x)} \, dx=\int \sqrt {a \cot ^{4}{\left (x \right )}}\, dx \]

[In]

integrate((a*cot(x)**4)**(1/2),x)

[Out]

Integral(sqrt(a*cot(x)**4), x)

Maxima [A] (verification not implemented)

none

Time = 0.39 (sec) , antiderivative size = 16, normalized size of antiderivative = 0.50 \[ \int \sqrt {a \cot ^4(x)} \, dx=-\sqrt {a} x - \frac {\sqrt {a}}{\tan \left (x\right )} \]

[In]

integrate((a*cot(x)^4)^(1/2),x, algorithm="maxima")

[Out]

-sqrt(a)*x - sqrt(a)/tan(x)

Giac [A] (verification not implemented)

none

Time = 0.27 (sec) , antiderivative size = 21, normalized size of antiderivative = 0.66 \[ \int \sqrt {a \cot ^4(x)} \, dx=-\frac {1}{2} \, \sqrt {a} {\left (2 \, x + \frac {1}{\tan \left (\frac {1}{2} \, x\right )} - \tan \left (\frac {1}{2} \, x\right )\right )} \]

[In]

integrate((a*cot(x)^4)^(1/2),x, algorithm="giac")

[Out]

-1/2*sqrt(a)*(2*x + 1/tan(1/2*x) - tan(1/2*x))

Mupad [F(-1)]

Timed out. \[ \int \sqrt {a \cot ^4(x)} \, dx=\int \sqrt {a\,{\mathrm {cot}\left (x\right )}^4} \,d x \]

[In]

int((a*cot(x)^4)^(1/2),x)

[Out]

int((a*cot(x)^4)^(1/2), x)